<div class="layui-row">
    <div class="layui-col-md6">
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">{{ __('smtp.server') }}<span
                            class="layui-font-red">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="domain" value="{{ setting.smtp.domain }}" class="layui-input">
                    <div class="layui-word-aux">{{ __('smtp.server_tip') }}</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ __('smtp.port') }}<span class="layui-font-red">*</span></label>
                <div class="layui-input-block">
                    <input type="number" name="port" value="{{ setting.smtp.port|default('25') }}" class="layui-input"
                           lay-affix="number">
                    <div class="layui-word-aux">{{ __('smtp.port_tip') }}</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ __('smtp.email') }}<span
                            class="layui-font-red">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="send_email" value="{{ setting.smtp.send_email }}"
                           class="layui-input">
                    <div class="layui-word-aux">{{ __('smtp.email_tip') }}</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ __('smtp.nickname') }}<span
                            class="layui-font-red">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="send_name" value="{{ setting.smtp.send_name }}"
                           class="layui-input">
                    <div class="layui-word-aux">作为邮件的发送人显示的昵称</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ __('smtp.password') }}<span
                            class="layui-font-red">*</span></label>
                <div class="layui-input-block">
                    <input type="password" name="send_password" value="{{ setting.smtp.send_password }}"
                           class="layui-input">
                    <div class="layui-word-aux">{{ __('smtp.password_tip') }}</div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">{{ __('smtp.receive') }}</label>
                <div class="layui-input-group">
                    <input type="text" name="email_receive" {% if not php_mailer %}disabled{% endif %}
                           value="{{ setting.smtp.email_receive }}"
                           class="layui-input">
                    <div class="layui-input-suffix">
                        <button class="layui-btn layui-btn-sm {% if not php_mailer %}layui-btn-disabled{% endif %}"
                                id="email-send-test">
                            {{ __('btn.send') }}
                        </button>
                    </div>
                    <div class="layui-word-aux">
                        {{ __('smtp.receive_tip') }}
                    </div>
                </div>
            </div>

            {% if not php_mailer %}
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <div class="layui-word-aux">
                            发送邮件依赖 phpmailer/phpmailer:^6.8 请先安装
                        </div>
                    </div>
                </div>
            {% endif %}

            <div class="layui-form-item">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="smtp">
                        {{ __('btn.save') }}
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
